<?php
/* @var $this ContainerController */
/* @var $model Container */

$this->breadcrumbs=array(
	$model->entry->code=>array('entry/view', 'id'=>$model->entry_id),
	$model->code,
);



require_once 'Mobile_Detect.php';
	
	

			$detect = new Mobile_Detect;
			
if ($detect->isMobile() ){
?>

<body style="background-image: url( http://i59.tinypic.com/35i0i0z.png )"> </body>


<?php

$this->menu=array(
	array('label'=>'List Containers', 'url'=>array('index')),
	array('label'=>'Manage Container', 'url'=>array('admin')),
	array('label'=>'Show Entry', 'url'=>array('entry/view', 'id'=>$model->entry_id)),


);

 
 } 
 
 else
 {
 
$this->menu=array(
	array('label'=>'List Containers', 'url'=>array('index')),
	//array('label'=>'Create Container', 'url'=>array('create')),
	array('label'=>'Update Container', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Container', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Container', 'url'=>array('admin')),
	array('label'=>'Show Entry', 'url'=>array('entry/view', 'id'=>$model->entry_id)),
	array('label'=>'Add Item', 'url'=>array('items/create', 'container_id'=>$model->id)),


);
 }
?>


<h1>View Container:<?php echo $model->code; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		//'id',
		//'size',
		'code',
		array('label'=>'Entry', 'value'=>$model->entry->code),
		
		
		
	),
)); ?>


	<?php /*$item= Items::model()->findAll('container_id = :a', array(':a'=>$model->id));?>
		
<?php if (count($item) !== 0){
$itemno = 0;
?>

<h2>Items </h2>
<?php foreach ($item as $row) { ?>


<h3><?php  $itemno++; echo $itemno . '.'. CHtml::link($row->description, array('items/view', 'id'=>$row->id));?>
</h3>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$row,
	'attributes'=>array(
		//'id',
		//'container_id',
		//array('label'=>'container', 'value'=>$model->container->code),
		'description',
		'quantity',
		'cost',
		'tariff_heading',
		'tariff_rate',
		'gross_weight',
	),
)); }}

*/?>








